#!/usr/bin/python3
# -*- coding:utf-8 -*-
# __author__ == taoyulong2018@gmail.com
# __time__ == 2023/7/14 12:40
# ===========================================
#       题目名称： 74. 搜索二维矩阵
#       题目地址： https://leetcode.cn/problems/search-a-2d-matrix/
#       题目描述： https://note.youdao.com/s/LWYgPSzT
# ===========================================


class Solution:

    def searchMatrix(self, matrix, target) -> bool:
        for item in matrix:
            if target in item:
                return True
        return False


if __name__ == '__main__':
    s = Solution()
    # True
    print(s.searchMatrix(matrix=[[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]], target=3))
    # False
    print(s.searchMatrix(matrix=[[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]], target=13))
